void main(List<String> args) {
  //Map<String,String>
  Map category = {
    'id': 1,
    'name': '居家',
  };

  //访问字典
  print(category);

  //查询：字典[key]
  print(category['id']);
  print(category['name']);

  //修改：字典[key]=新值
  category['name'] = '美食';
  print(category);

  //2.3新增：字典[新增key]=新值
  //注意：不存在的key为新增，key已存在就是修改
  category['price'] = 999.99;
  print(category);

  //删除:remove(key)
  //注意：如果key不存在，不会报错
  category.remove('name');
  print(category);

  //遍历字典
  category.forEach((key, value) {
    print('键：$key 值：$value');
  });
}
